package com.ruoyi.employee.domain;

import java.math.BigDecimal;
import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;

/**
 * 员工信息对象 hr_employee
 *
 * @author hango
 * @date 2025-10-13
 */
public class HrEmployee extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** 主键ID */
    private Long id;

    /** 工号（唯一） */
    @Excel(name = "工号")
    private String empNo;

    /** 姓名 */
    @Excel(name = "姓名")
    private String name;

    /** 性别：0未知 1男 2女（字典） */
    @Excel(name = "性别")
    private String gender;

    /** 出生日期 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "出生日期", width = 30, dateFormat = "yyyy-MM-dd")
    private Date birthday;

    /** 身份证号（唯一，允许空） */
    @Excel(name = "身份证号")
    private String idCard;

    /** 身份证止时间（前端：idCardExpire） */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "身份证止时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date idCardExpire;

    /** 手机号（唯一，允许空） */
    @Excel(name = "手机号")
    private String phone;

    /** 邮箱 */
    @Excel(name = "邮箱")
    private String email;

    /** 民族（展示） */
    @Excel(name = "民族")
    private String nation;

    /** 民族（字典） */
    @Excel(name = "民族(字典)")
    private String ethnicity;

    /** 籍贯 */
    @Excel(name = "籍贯")
    private String nativePlace;

    /** 户籍地址 */
    @Excel(name = "户籍地址")
    private String hukouAddress;

    /** 现住地址 */
    @Excel(name = "现住地址")
    private String currentAddress;

    /** 最高学历（旧） */
    @Excel(name = "最高学历")
    private String education;

    /** 教育程度（字典） */
    @Excel(name = "教育程度")
    private String educationLevel;

    /** 用工类型：fulltime/parttime/dispatch/intern（字典） */
    @Excel(name = "用工类型")
    private String hireType;

    /** 入职来源（字典） */
    @Excel(name = "入职来源")
    private String hireSource;

    /** 入职日期 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "入职日期", width = 30, dateFormat = "yyyy-MM-dd")
    private Date entryDate;

    /** 用工之日（实际开始用工） */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "用工之日", width = 30, dateFormat = "yyyy-MM-dd")
    private Date employDate;

    /** 试用期（月） */
    private Integer probationMonths;

    /** 转正日期 */
    private Date regularDate;

    /** 试用期到期（计划） */
    private Date probationEndPlan;

    /** 试用期到期（实际） */
    private Date probationEndActual;

    /** 申请离职日期 */
    private Date resignApplyDate;

    /** 实际离职日期 */
    private Date resignActualDate;

    /** 离职日期（兼容） */
    private Date leaveDate;

    /** 在/离职：0在职 1离职（字典） */
    private String empStatus;

    /** 人员状态（字典） */
    @Excel(name = "人员状态")
    private String personnelStatus;

    /** 是否黑名单：0否 1是 */
    @Excel(name = "是否黑名单")
    private Integer isBlacklist;

    /** 公司ID（sys_dept.dept_id） */
    private Long companyId;

    /** 部门ID（sys_dept.dept_id） */
    private Long deptId;

    /** 库别ID（base_storehouse.id） */
    private Long storehouseId;

    /** 岗位ID（base_post.id） */
    private Long postId;

    /** 职级ID（base_rank.id） */
    private Long rankId;

    /** 默认工资类型ID（sal_salary_type.id） */
    private Long salaryTypeId;

    /** 工作城市代码 */
    private String workCityCode;

    /** 办公地点ID（base_location.id） */
    private Long workLocationId;

    /** 户籍性质：local/nonlocal/collective（字典） */
    private String residenceType;

    /** 工资卡开户名 */
    private String bankAccountName;

    /** 银行名称 */
    private String bankName;

    /** 开户行支行 */
    private String bankBranch;

    /** 银行卡号 */
    private String bankAccountNo;

    /** 个税识别号 */
    private String taxId;

    /** 通讯地址 */
    private String address;

    /** 商保标记：0未购买 1已购买/需处理 */
    private Integer commercialInsuranceFlag;

    /** 逻辑删除：0存在 1删除 */
    private String delFlag;

    /* ===== 前端新增需要持久化的字段 ===== */

    /** 照片相对地址（前端用 toAbsUrl 显示） */
    @Excel(name = "照片地址")
    private String photoUrl;

    /** 紧急联系人 */
    @Excel(name = "紧急联系人")
    private String emergencyContact;

    /** 紧急联系方式 */
    @Excel(name = "紧急联系方式")
    private String emergencyPhone;

    /** 介绍人 */
    @Excel(name = "介绍人")
    private String referrer;

    /** 归属体系（如：亚集/新普） */
    @Excel(name = "归属体系")
    private String belongSystem;

    /* ===== 社保/公积金持久化字段（新增） ===== */
    /** 社保方案ID */
    private Long ssSchemeId;

    /** 公积金方案ID */
    private Long hfSchemeId;

    /** 基本养老金(个入) */
    private BigDecimal pensionPersonal;

    /** 医疗保险(个入) */
    private BigDecimal medicalPersonal;

    /** 失业保险(个入) */
    private BigDecimal unemployPersonal;

    /** 公积金金额(个入) */
    private BigDecimal fundAmount;

    /* ====== 关联展示字段（仅显示/导出，不入库） ====== */

    /** 公司名称（sys_dept.dept_name） */
    @Excel(name = "公司")
    private String companyName;

    /** 部门名称（sys_dept.dept_name） */
    @Excel(name = "部门")
    private String deptName;

    /** 库别名称（base_storehouse.name） */
    @Excel(name = "库别")
    private String storehouseName;

    /** 岗位名称（base_post.name） */
    @Excel(name = "岗位")
    private String postName;

    /** 办公地点名称（base_location.name） */
    @Excel(name = "办公地点")
    private String workLocationName;

    public void setId(Long id) { this.id = id; }
    public Long getId() { return id; }

    public void setEmpNo(String empNo) { this.empNo = empNo; }
    public String getEmpNo() { return empNo; }

    public void setName(String name) { this.name = name; }
    public String getName() { return name; }

    public void setGender(String gender) { this.gender = gender; }
    public String getGender() { return gender; }

    public void setBirthday(Date birthday) { this.birthday = birthday; }
    public Date getBirthday() { return birthday; }

    public void setIdCard(String idCard) { this.idCard = idCard; }
    public String getIdCard() { return idCard; }

    public Date getIdCardExpire() { return idCardExpire; }
    public void setIdCardExpire(Date idCardExpire) { this.idCardExpire = idCardExpire; }

    public void setPhone(String phone) { this.phone = phone; }
    public String getPhone() { return phone; }

    public void setEmail(String email) { this.email = email; }
    public String getEmail() { return email; }

    public void setNation(String nation) { this.nation = nation; }
    public String getNation() { return nation; }

    public void setEthnicity(String ethnicity) { this.ethnicity = ethnicity; }
    public String getEthnicity() { return ethnicity; }

    public void setNativePlace(String nativePlace) { this.nativePlace = nativePlace; }
    public String getNativePlace() { return nativePlace; }

    public void setHukouAddress(String hukouAddress) { this.hukouAddress = hukouAddress; }
    public String getHukouAddress() { return hukouAddress; }

    public void setCurrentAddress(String currentAddress) { this.currentAddress = currentAddress; }
    public String getCurrentAddress() { return currentAddress; }

    public void setEducation(String education) { this.education = education; }
    public String getEducation() { return education; }

    public void setEducationLevel(String educationLevel) { this.educationLevel = educationLevel; }
    public String getEducationLevel() { return educationLevel; }

    public void setHireType(String hireType) { this.hireType = hireType; }
    public String getHireType() { return hireType; }

    public void setHireSource(String hireSource) { this.hireSource = hireSource; }
    public String getHireSource() { return hireSource; }

    public void setEntryDate(Date entryDate) { this.entryDate = entryDate; }
    public Date getEntryDate() { return entryDate; }

    public void setEmployDate(Date employDate) { this.employDate = employDate; }
    public Date getEmployDate() { return employDate; }

    public void setProbationMonths(Integer probationMonths) { this.probationMonths = probationMonths; }
    public Integer getProbationMonths() { return probationMonths; }

    public void setRegularDate(Date regularDate) { this.regularDate = regularDate; }
    public Date getRegularDate() { return regularDate; }

    public void setProbationEndPlan(Date probationEndPlan) { this.probationEndPlan = probationEndPlan; }
    public Date getProbationEndPlan() { return probationEndPlan; }

    public void setProbationEndActual(Date probationEndActual) { this.probationEndActual = probationEndActual; }
    public Date getProbationEndActual() { return probationEndActual; }

    public void setResignApplyDate(Date resignApplyDate) { this.resignApplyDate = resignApplyDate; }
    public Date getResignApplyDate() { return resignApplyDate; }

    public void setResignActualDate(Date resignActualDate) { this.resignActualDate = resignActualDate; }
    public Date getResignActualDate() { return resignActualDate; }

    public void setLeaveDate(Date leaveDate) { this.leaveDate = leaveDate; }
    public Date getLeaveDate() { return leaveDate; }

    public void setEmpStatus(String empStatus) { this.empStatus = empStatus; }
    public String getEmpStatus() { return empStatus; }

    public void setPersonnelStatus(String personnelStatus) { this.personnelStatus = personnelStatus; }
    public String getPersonnelStatus() { return personnelStatus; }

    public void setIsBlacklist(Integer isBlacklist) { this.isBlacklist = isBlacklist; }
    public Integer getIsBlacklist() { return isBlacklist; }

    public void setCompanyId(Long companyId) { this.companyId = companyId; }
    public Long getCompanyId() { return companyId; }

    public void setDeptId(Long deptId) { this.deptId = deptId; }
    public Long getDeptId() { return deptId; }

    public void setStorehouseId(Long storehouseId) { this.storehouseId = storehouseId; }
    public Long getStorehouseId() { return storehouseId; }

    public void setPostId(Long postId) { this.postId = postId; }
    public Long getPostId() { return postId; }

    public void setRankId(Long rankId) { this.rankId = rankId; }
    public Long getRankId() { return rankId; }

    public void setSalaryTypeId(Long salaryTypeId) { this.salaryTypeId = salaryTypeId; }
    public Long getSalaryTypeId() { return salaryTypeId; }

    public void setWorkCityCode(String workCityCode) { this.workCityCode = workCityCode; }
    public String getWorkCityCode() { return workCityCode; }

    public void setWorkLocationId(Long workLocationId) { this.workLocationId = workLocationId; }
    public Long getWorkLocationId() { return workLocationId; }

    public void setResidenceType(String residenceType) { this.residenceType = residenceType; }
    public String getResidenceType() { return residenceType; }

    public void setBankAccountName(String bankAccountName) { this.bankAccountName = bankAccountName; }
    public String getBankAccountName() { return bankAccountName; }

    public void setBankName(String bankName) { this.bankName = bankName; }
    public String getBankName() { return bankName; }

    public void setBankBranch(String bankBranch) { this.bankBranch = bankBranch; }
    public String getBankBranch() { return bankBranch; }

    public void setBankAccountNo(String bankAccountNo) { this.bankAccountNo = bankAccountNo; }
    public String getBankAccountNo() { return bankAccountNo; }

    public void setTaxId(String taxId) { this.taxId = taxId; }
    public String getTaxId() { return taxId; }

    public void setAddress(String address) { this.address = address; }
    public String getAddress() { return address; }

    public void setCommercialInsuranceFlag(Integer commercialInsuranceFlag) { this.commercialInsuranceFlag = commercialInsuranceFlag; }
    public Integer getCommercialInsuranceFlag() { return commercialInsuranceFlag; }

    public void setDelFlag(String delFlag) { this.delFlag = delFlag; }
    public String getDelFlag() { return delFlag; }

    public String getPhotoUrl() { return photoUrl; }
    public void setPhotoUrl(String photoUrl) { this.photoUrl = photoUrl; }

    public String getEmergencyContact() { return emergencyContact; }
    public void setEmergencyContact(String emergencyContact) { this.emergencyContact = emergencyContact; }

    public String getEmergencyPhone() { return emergencyPhone; }
    public void setEmergencyPhone(String emergencyPhone) { this.emergencyPhone = emergencyPhone; }

    public String getReferrer() { return referrer; }
    public void setReferrer(String referrer) { this.referrer = referrer; }

    public String getBelongSystem() { return belongSystem; }
    public void setBelongSystem(String belongSystem) { this.belongSystem = belongSystem; }

    public Long getSsSchemeId() { return ssSchemeId; }
    public void setSsSchemeId(Long ssSchemeId) { this.ssSchemeId = ssSchemeId; }

    public Long getHfSchemeId() { return hfSchemeId; }
    public void setHfSchemeId(Long hfSchemeId) { this.hfSchemeId = hfSchemeId; }

    public BigDecimal getPensionPersonal() { return pensionPersonal; }
    public void setPensionPersonal(BigDecimal pensionPersonal) { this.pensionPersonal = pensionPersonal; }

    public BigDecimal getMedicalPersonal() { return medicalPersonal; }
    public void setMedicalPersonal(BigDecimal medicalPersonal) { this.medicalPersonal = medicalPersonal; }

    public BigDecimal getUnemployPersonal() { return unemployPersonal; }
    public void setUnemployPersonal(BigDecimal unemployPersonal) { this.unemployPersonal = unemployPersonal; }

    public BigDecimal getFundAmount() { return fundAmount; }
    public void setFundAmount(BigDecimal fundAmount) { this.fundAmount = fundAmount; }

    public String getCompanyName() { return companyName; }
    public void setCompanyName(String companyName) { this.companyName = companyName; }

    public String getDeptName() { return deptName; }
    public void setDeptName(String deptName) { this.deptName = deptName; }

    public String getStorehouseName() { return storehouseName; }
    public void setStorehouseName(String storehouseName) { this.storehouseName = storehouseName; }

    public String getPostName() { return postName; }
    public void setPostName(String postName) { this.postName = postName; }

    public String getWorkLocationName() { return workLocationName; }
    public void setWorkLocationName(String workLocationName) { this.workLocationName = workLocationName; }

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
                .append("id", getId())
                .append("empNo", getEmpNo())
                .append("name", getName())
                .append("gender", getGender())
                .append("birthday", getBirthday())
                .append("idCard", getIdCard())
                .append("idCardExpire", getIdCardExpire())
                .append("phone", getPhone())
                .append("email", getEmail())
                .append("nation", getNation())
                .append("ethnicity", getEthnicity())
                .append("nativePlace", getNativePlace())
                .append("hukouAddress", getHukouAddress())
                .append("currentAddress", getCurrentAddress())
                .append("education", getEducation())
                .append("educationLevel", getEducationLevel())
                .append("hireType", getHireType())
                .append("hireSource", getHireSource())
                .append("entryDate", getEntryDate())
                .append("employDate", getEmployDate())
                .append("probationMonths", getProbationMonths())
                .append("regularDate", getRegularDate())
                .append("probationEndPlan", getProbationEndPlan())
                .append("probationEndActual", getProbationEndActual())
                .append("resignApplyDate", getResignApplyDate())
                .append("resignActualDate", getResignActualDate())
                .append("leaveDate", getLeaveDate())
                .append("empStatus", getEmpStatus())
                .append("personnelStatus", getPersonnelStatus())
                .append("isBlacklist", getIsBlacklist())
                .append("companyId", getCompanyId())
                .append("deptId", getDeptId())
                .append("storehouseId", getStorehouseId())
                .append("postId", getPostId())
                .append("rankId", getRankId())
                .append("salaryTypeId", getSalaryTypeId())
                .append("workCityCode", getWorkCityCode())
                .append("workLocationId", getWorkLocationId())
                .append("residenceType", getResidenceType())
                .append("bankAccountName", getBankAccountName())
                .append("bankName", getBankName())
                .append("bankBranch", getBankBranch())
                .append("bankAccountNo", getBankAccountNo())
                .append("taxId", getTaxId())
                .append("address", getAddress())
                .append("commercialInsuranceFlag", getCommercialInsuranceFlag())
                .append("remark", getRemark())
                .append("createBy", getCreateBy())
                .append("createTime", getCreateTime())
                .append("updateBy", getUpdateBy())
                .append("updateTime", getUpdateTime())
                .append("delFlag", getDelFlag())
                .append("photoUrl", getPhotoUrl())
                .append("emergencyContact", getEmergencyContact())
                .append("emergencyPhone", getEmergencyPhone())
                .append("referrer", getReferrer())
                .append("belongSystem", getBelongSystem())
                .append("ssSchemeId", getSsSchemeId())
                .append("hfSchemeId", getHfSchemeId())
                .append("pensionPersonal", getPensionPersonal())
                .append("medicalPersonal", getMedicalPersonal())
                .append("unemployPersonal", getUnemployPersonal())
                .append("fundAmount", getFundAmount())
                .append("companyName", getCompanyName())
                .append("deptName", getDeptName())
                .append("storehouseName", getStorehouseName())
                .append("postName", getPostName())
                .append("workLocationName", getWorkLocationName())
                .toString();
    }
}
